import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { id } from 'element-plus/es/locale';

/**
 * 新增企业融资
 */
export function addFinancing(data:any) {
  return request({
    url: '/api/financing',
    method: 'post',
    data: data
  });
}

/**
 * 编辑项目
 */
export function updataFinancing(data:any) {
  return request({
    url: '/api/financing/' + data.id ,
    method:'put',
    data:data
  });
}

/**
 * 删除企业融资列表
 */
export function deleteFinancing(data:any) {
  return request({
    url: '/api/financing',
    method: 'delete',
	data:data
  });
}

/**
 * 获取企业融资列表
 */
export function getFinancingList(data:any) {
  return request({
    url: '/api/financing' ,
    method: 'get',
	params:data
  });
}

/**
 * 获取企业融资列表-详情
 */
export function getFinancing(data:any) {
  return request({
    url: '/api/financing/'+ data.id ,
    method: 'get',
	params:data
  });
}


/**
 * 企业融资 新增
 */
export function financingLogAdd(data:any) {
  return request({
    url: '/api/financing/log',
    method: 'post',
    data: data
  });
}

/**
 * 企业融资 编辑
 */
export function financingLogEdit(id:any,data:any) {
  return request({
    url: '/api/financing/log/' + id ,
    method:'put',
    data:data
  });
}
/**
 * 企业融资 列表
 */
export function financingLogList(data:any) {
  return request({
    url: '/api/financing/log',
    method: 'get',
    params:data
  });
}
/**
 * 企业融资 详情
 */
export function financingLogInfo(data:any) {
  return request({
    url: '/api/financing/log/'+ data.id ,
    method: 'get',
	params:data
  });
}
/**
 * 企业融资 删除
 */
export function financingLogDel(data:any) {
  return request({
    url: '/api/financing/log',
    method: 'delete',
	data:data
  });
}